<template>
  <div class="header-container">
    <!-- 左侧 Logo 和系统选择 -->
    <div class="header-left">
      <img src="/logo.png" alt="logo" class="logo-img" />
      <h3>西安国债</h3>
    </div>
    <!-- 右侧用户信息 -->
    <div class="header-right">
      <UserMenu />
    </div>
  </div>
</template>

<script setup lang="ts">
import UserMenu from './components/UserMenu.vue'
</script>

<style lang="scss" scoped>
.header-container {
  font-family: "KoiFont", Helvetica, "PingFang SC", "Microsoft Yahei", 'Alimama ShuHeiTi', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  background: url(@/assets/images/topBg.png) no-repeat;
  background-size: 100% 100%;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 300px;
  max-width: 410px;

  .logo-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  h3 {
    font-family: "Alimama ShuHeiTi", sans-serif;
  }
}


.header-right {
  min-width: 120px;
  :deep(.user-info) {
    font-size: 16px;
    font-weight: normal;
  }
}

.location {
  cursor: pointer;
  min-width: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;

  .location-text {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;

    span {
      white-space: nowrap;
      font-weight: normal;

      &.current-location {
        font-weight: 500; // 中等字重
      }

      &.divider {
        color: rgba(255, 255, 255, 0.5);
        font-size: 12px;
      }
    }
  }

  &:hover {
    opacity: 0.8;
  }
}


.notice-info {
  flex: 1;
  min-width: 200px;
  max-width: 500px;

  img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .notice-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: normal;
  }
}

</style>
